package jzOffer;

public class Num11 {
    public int minNumberInRotateArray(int [] array) {
        if(array.length==0) return 0;
        int i=0;
        int j=array.length-1;
        while(i<j){
            int mid=(i+j)/2;
            if(array[j]<array[mid]){
                i=mid+1;
            }else if(array[j]>array[mid]){
                j=mid;
            }else{
                j--;
            }
        }
        return array[i];
    }
}
